Adds each of the components to the class. If they contain a mixin template called ExpandFields, it will
be automatically mixed in.
Params - Components - A list of IBaseComponent implementations
Best Practice: Use pragma(inline, true) and final if they are a function, as could be a significant difference in the binary
ExpandFields Example :
mixin template ExpandFields() ///Expand fields from BodyRectComponent
{ //Used for convenient access without needing to use _BodyRectComponent.position.x
pragma(inline, true)
{
final ref float x(){ return _BodyRectComponent.position.x; }
final ref float y(){ return _BodyRectComponent.position.y; }
final ref Vector2 velocity(){ return _BodyRectComponent.velocity; }
final ref Vector2 position(){ return _BodyRectComponent.position; }
final ref Size size(){ return _BodyRectComponent.size; }
}
}
Adds each of the components to the class. If they contain a mixin template called ExpandFields, it will be automatically mixed in. Params - Components - A list of IBaseComponent implementations Best Practice: Use pragma(inline, true) and final if they are a function, as could be a significant difference in the binary ExpandFields Example :